import 'package:dio/dio.dart';
import 'package:wallpaper/http/dio_instance.dart';

String mobileBase = 'http://service.picasso.adesk.com/v1/vertical';

// 不分类获取全部
Future<Response> mobileAll(
        {required int page, required int limit, required String order}) =>
    DioInstance.instance().get(
        path:
            '$mobileBase/vertical?limit=$limit&order=$order&skip=${(page - 1) * limit}');

// 获取手机壁纸分类
Future<Response> mobileCategory() => DioInstance.instance()
    .get(path: '$mobileBase/category?adult=false&first=1');

// 获取手机壁纸分类下的图片
Future<Response> mobileCategoryAll(
        {required int page,
        required int limit,
        required String order,
        required String category}) =>
    DioInstance.instance().get(
        path:
            '$mobileBase/category/$category/vertical?limit=$limit&order=$order&skip=${(page - 1) * limit}');
